import request from './request'
const http = {
  /**
   * methods: 请求
   * @param url 请求地址
   * @param params 请求参数
   */
  get(url, params, exconfig = {}) {
    const config = {
      method: 'get',
      url: url,
      headers: {
      },
      ...exconfig
    }
    if (params) config.params = params
    return request(config)
  },
  post(url, params, exconfig = {}) {

    const config = {
        method: 'post',
        url: url,
        headers: {
        },
        ...exconfig,
      }
      if (params) config.data = params
      return request(config)
    // }

  },

}
//导出
export default http
